﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.IO;
using System.IO.IsolatedStorage;

//using System.IO.StreamWriter;
using System.Collections.Generic;
using Microsoft.Practices.Prism.ViewModel;
using Microsoft.Practices.Prism.Commands;

namespace RecorderSound.Model
{
    public class Storage : Record
    {
        //IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication();
        public string fileName;
        public string content = "txt";
        
        
        public void SaveFile(string Name)
        {
            List list = new List(Name);
            
            using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication())
            {

                using (IsolatedStorageFileStream file = isf.CreateFile(list.name))
                {
                    foreach (byte[] buffer in buffercollection)
                        file.Write(buffer, 0, buffer.Length);

                }

            }

        }

  
              
    }
}
